<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	<script type="text/javascript" src="pinyin.js"></script>
	<script type="text/javascript">
	$(function(){
		$('#in').on('keyup',function(){
			var t = $(this),str;
			str = $.trim(t.val());

			console.log(str);
			$('#out').text(codefans_net_CC2PY(str))
		})
	})
	</script>
</head>
<body>
	<input id="in" type="text" />
	<div id="out">输出区</div>
</body>
</html>